Skip to content

Document that list accepts --sort none as creation order - #103

Merged
dmccoystephenson merged 2 commits into
mainfrom
feat/document-list-sort-none
Nov 20, 2026
Merged

dmccoystephenson merged 2 commits into
mainfrom
feat/document-list-sort-none

Conversation

@dmccoystephenson

Copy link
Copy Markdown
Member

Summary

  • Stage A documentation accuracy sweep. One drift was found: the README's List section stated that any value outside the supported sort keys prints Invalid sort option... and lists nothing. In fact list --sort none, in any capitalization, is accepted and behaves exactly like omitting --sort (creation order, plain Projects: header), because none is the option's default value (ListProjectsCommand.SORT_NONE, compared with equalsIgnoreCase).
  • The README now documents --sort none, and a new ListProjectsCommandTest case (shouldKeepCreationOrderWhenNoneIsTypedAsTheSortValue) pins the behaviour using the user-typed spelling NONE, so the doc claim cannot drift silently.
  • Production code is unchanged. Treating none as accepted was judged consistent with the existing invalid-value message ("or omit --sort to keep creation order"), so it was documented rather than filed as a bug.
  • The rest of README.md and CONTRIBUTING.md was checked against the commands, ProjectRepository, ProjectMarkdownWriterImpl, install.sh, application.yaml and both workflows; no other drift was found.

Deferred

Test plan

  • ./gradlew test on JDK 21: 202 tests, 0 failures, 0 errors, 0 skipped (counted from build/test-results/test/*.xml)
  • New test is present in the results and passes

No tracking issue — gap found during a documentation sweep.

This PR description was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).

🤖 Generated with Claude Code


drafted by Claude on behalf of Daniel Stephenson

The README said every value outside the supported sort keys is rejected,
but `list --sort none` (any capitalization) is accepted and keeps
creation order, because `none` is the option's default value. Document
it and pin the behaviour with a test.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Nov 20, 2026 •

Copy link
Copy Markdown

Test Results

202 tests  +1   202 ✅ +1   2s ⏱️ ±0s
 26 suites ±0     0 💤 ±0 
 26 files   ±0     0 ❌ ±0 

Results for commit 0e369d1. ± Comparison against base commit 3522d1e.

♻️ This comment has been updated with latest results.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dmccoystephenson

Copy link
Copy Markdown
Member Author

Self-review rubric (PR #103):

  • Scope: PASS — two files: the README List paragraph and one new ListProjectsCommandTest case; no unrelated churn.
  • Tests-new: PASS — no new production methods; the documented --sort none behaviour is pinned by shouldKeepCreationOrderWhenNoneIsTypedAsTheSortValue.
  • Tests-fix: N/A — no bug fix; production code is unchanged (characterization test only).
  • Sibling structure: PASS — the new test follows the Given/When/Then comment style and the JUnit assertTrue/assertFalse convention of its neighbours.
  • Sibling renames: N/A — nothing renamed.
  • Docs: PASS after one fix — the following sentence ("with none, list prints No projects found.") read ambiguously next to --sort none and was reworded to "with no projects saved" in a follow-up commit. CONTRIBUTING.md needs no change.
  • Issue resolution: N/A — no Closes; gap found during a documentation sweep.
  • Manual validation: PASS — ./gradlew test on JDK 21 ran 202 tests with 0 failures (counted from the JUnit XML); CI build (21), test and Test Results are green on the PR head.
  • Shell command tests: PASS — no command class changed; ListProjectsCommandTest gains coverage.
  • Round-trip coverage: N/A — Project unchanged.
  • I/O behind an interface: N/A — no new I/O code.

Judgment call noted: none could be seen as an internal sentinel leaking to users rather than an intended value. It was documented rather than filed as a bug because the invalid-value message already points users to creation order, and rejecting none would be a behaviour change outside a documentation cycle.

README.md:121 — --sort none sentence added; adjacent "with none" wording disambiguated.

This review comment was drafted during a Gardener session (https://github.com/Stephenson-Software/gardener).


drafted by Claude on behalf of Daniel Stephenson

@dmccoystephenson
dmccoystephenson merged commit 0e8fafc into main Nov 20, 2026
3 checks passed
@dmccoystephenson
dmccoystephenson deleted the feat/document-list-sort-none branch November 20, 2026 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant